#pragma once

#include "ui_render.h"

_SSL_BEGIN
_SSUIL_BEGIN

typedef struct _ImageInfoData
{
	void *image_h_;
	int cx;
	int cy;

	_ImageInfoData()
	{
		image_h_ = NULL;
		cx = 0;
		cy = 0;
	}
} UIImageInfoData;

class UIGdiplusImageManager
{
public:
	UIGdiplusImageManager();
	virtual ~UIGdiplusImageManager();

public:
	virtual const tchar* GetImageType();
	virtual UIImageD GetImage(const tstring &img_name);
	virtual bool CheckPresetImageInfo(const UIPresetImage &preset_img, UIPresetImageInfo &info);
	virtual bool CheckImageDInfo(const UIImageD &img_data, UIPresetImageInfo &info);
	virtual UIImageD GenerateImageFromHandle(HBITMAP bitmap);
	virtual void ReleaseImage(UIImageD &img);

	virtual IUIDiskFilesManagerInterfaceAutoPtr SetDiskFilesManager(IUIDiskFilesManagerInterface * disk_man );
	virtual IUIDiskFilesManagerInterfaceAutoPtr GetDiskFilesManager();

protected:
	typedef std::map<tstring, UIImageInfoData*> image_info_for_stbs_ptrs;
	image_info_for_stbs_ptrs image_infos_;
	IUIDiskFilesManagerInterfaceAutoPtr disk_manager_;
};


_SSUIL_END
_SSL_END

